package com.pmcc.platform.user.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.pmcc.core.entity.BaseEntity;
import com.pmcc.platform.user.enums.MinUserType;
import lombok.Data;

import javax.persistence.*;
import java.sql.Timestamp;

@Data
@Entity
@Table(name = "ds_min_salesman_user_info")
public class MinSalesmanUserInfo extends BaseEntity {


    @Column(name = "NICK_NAME")
    private String nickName;//昵称

    @Column(name = "CODE")
    private String code;//用户CODE

    @Column(name = "PHONE")
    private String phone;//手机号

    @Column(name = "PHOTO_URL")
    private String photoUrl;//头像路径

    @Column(name = "SEX")
    private String sex;//用户的性别，值为1时是男性，值为2时是女性，值为0时是未知

    @Column(name = "STATUS")
    private String status;//状态(0：禁用，1：启用）

    @Column(name = "OPEN_ID")
    private String openId;//用户在微信小程序的标识

    @Column(name = "LAST_TIME")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp lastTime;//最后一次登录时间

    @Column(name="LONGITUDE")
    private Double longitude;//经度

    @Column(name="LATITUDE")
    private Double latitude;//纬度

    @Transient
    private String salesmanId;//业务员id


    @Transient
    private String sessionKey;//微信返回的sessionKey

    @Transient
    private Boolean miniAuditState;//小程序审核状态

    @Transient
    private String isLog;//是否登录 0：不登陆 1：进登陆





}
